Conversation
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
There was a problem hiding this comment.
Pull request overview
This PR migrates the OAS validator from locally stored Spectral ADR ruleset YAML files to externally maintained ADR rulesets, so ruleset updates can be consumed via a dependency instead of repository file changes.
Changes:
- Replace filesystem/YAML-based Spectral ruleset loading with dynamic imports from
@developer-overheid-nl/adr-rulesets. - Expand measured rule-code mappings to include
nlgov:-prefixed rule codes. - Remove local ADR ruleset YAML files and adjust npm dependencies accordingly.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/OasValidatorService.js | Loads ADR rulesets via external package loaders and updates measured rule-code mappings. |
| rulesets/ruleset_2.0.yaml | Removes local ruleset file (now sourced externally). |
| rulesets/ruleset_2.1.yaml | Removes local ruleset file (now sourced externally). |
| package.json | Adds external ADR rulesets dependency and adds explicit @stoplight/spectral-core. |
| package-lock.json | Locks new git-sourced ADR rulesets dependency and related dependency graph updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@apiture/openapi-down-convert": "^0.14.2", | ||
| "@developer-overheid-nl/adr-rulesets": "github:developer-overheid-nl/adr-rulesets#main", | ||
| "@redocly/cli": "^2.20.5", | ||
| "@scalar/openapi-upgrader": "^0.2.3", | ||
| "@stoplight/spectral-core": "^1.21.0", | ||
| "@stoplight/spectral-parsers": "^1.0.5", |
There was a problem hiding this comment.
De dependency @developer-overheid-nl/adr-rulesets wordt vanaf de main branch van GitHub geïnstalleerd. Dat maakt builds niet reproduceerbaar en resulteert (zie ook package-lock) in een git/SSH fetch, wat vaak faalt in CI/Docker omgevingen zonder git/SSH keys. Pin naar een vaste release/tag/commit en gebruik een HTTPS git URL of (liever) een gepubliceerde npm-versie.
| const RULESET_LOADERS = { | ||
| "2.0": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-20"), | ||
| "2.1": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-21"), | ||
| "2.2": () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-22"), | ||
| draft: () => import("@developer-overheid-nl/adr-rulesets/rulesets/adr-draft"), | ||
| }; |
There was a problem hiding this comment.
De validator accepteert nu ook targetVersion "2.2" en "draft" (via RULESET_LOADERS). In api/openapi.json staat bij OASInput en de /v1/oas/validate beschrijving nog dat validatie alleen 2.0 of 2.1 ondersteunt. Werk de API-specificatie/contracttekst bij, of beperk de toegestane versies hier tot wat publiek gedocumenteerd is.
- Changed license from Unlicense to EUPL-1.2 - Updated @redocly/cli from ^2.20.5 to ^2.30.2 - Updated @scalar/openapi-upgrader from ^0.2.3 to ^0.2.6 - Updated @stoplight/spectral-rulesets from ^1.22.0 to ^1.22.1 - Updated @stoplight/spectral-runtime from ^1.1.4 to ^1.1.5 - Updated express from ^5.1.0 to ^5.2.1 - Updated openapi-to-postmanv2 from ^5.3.4 to ^6.0.1 - Updated @biomejs/biome from ^2.3.4 to ^2.4.13 [deploy-test]
Co-authored-by: Copilot <copilot@github.com>
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
No description provided.